<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Categorization and Use of the Libraries
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora073.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora075.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2> Categorization and Use of the Libraries</H2>
The libraries in the Objective CAML distribution fall into three categories.
The first contains preloaded global declarations. The second is called the
standard library and is subdivided into four parts:
<UL>
<LI>
 data structures;

<LI> input/output

<LI> system interface;

<LI> lexical and syntactic analysis.
</UL>
Finally there are the libraries in the third group that generally extend the
language, such as the <TT>Graphics</TT> library (see chapter <A HREF="index.html#chap-PG">5</A>).
In this last group you will find libraries dealing with the following areas:
regular expressions (<TT>Str</TT>), arbitrary-precision math (<TT>Num</TT>), Unix system
calls (<TT>Unix</TT>),
lightweight processes (<TT>Threads</TT>) and dynamic loading of bytecode
(<TT>Dynlink</TT>).<BR>
<BR>
The I/O and the system interface portions of the standard library are
compatible with different operating systems such as Unix, Windows
and MacOS. This is not always the case with the libraries in the
third group (those that extend the language). There are also many
independently written libraries that are not part of the Objective CAML
distribution.<BR>
<BR>

<H5> Usage and naming</H5><A NAME="notation-mod"></A>
<A NAME="@fonctions200"></A>
<A NAME="@concepts147"></A>
<A NAME="@concepts148"></A>To use modules or libraries in a program, one has to use dot notation to
specify the module name and the object to access. For example if one wants
to use a function <TT>f</TT> in a library called <TT>Name</TT>, one qualifies
it as <TT>Name.f</TT>. To avoid having to prefix everything with the name
of the library, it is possible to open the library and use <TT>f</TT> directly.<BR>
<BR>


<H3> Syntax </H3> <HR>

 
 <B>open</B> <TT>Name</TT>



<HR>

<BR>
<BR>
From then on, all the global declarations of the library <TT>Name</TT> will
be considered as if they belonged to the global environment. If two
declarations have the same name in two distinct open libraries, then only
the last declaration is visible. To be able to call the first, it would be
necessary to use the point notation.<BR>
<BR>
<HR>
<A HREF="book-ora073.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora075.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
